/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-08-21 16:00:37
 * @LastEditors: turingchang
 * @LastEditTime: 2020-11-13 16:44:42
 */

var enums = {};


enums.response_code_enum = {
    success: { code: 1000, info: 'ok', msg: '成功' },
    fail: { code: 1001, info: 'fail', msg: '失败' },
    server_error: { code: 1010, info: 'server_error', msg: '服务器响应异常' },
    illegal_request: { code: 1011, info: 'illegal_request', msg: '非法请求' },
    param_error: { code: 1012, info: 'param_error', msg: '请求参数错误' },
    miss_required_params: { code: 1013, info: 'miss_required_params', msg: '缺少必要参数' },
    invalid_token: { code: 1014, info: 'invalid_token', msg: '不合法的Token令牌' },  
    token_expired: { code: 1015, info: 'token_expired', msg: 'Token已过期,请重新获取令牌' },   
    not_found: { code: 1016, info: 'not_found', msg: '404 not found 请求的资源不存在' },    
    forbid: { code: 1017, info: 'forbid', msg: '检测到安全威胁，已禁止访问' },    
    unauthorized: { code: 1018, info: 'unauthorized', msg: '请求被限制，您无权访问' },    
};

/**
 * 权限类型
 */
enums.permission_type ={
    menu:{ name:'菜单', value:'menu'},
    action:{name:'操作',value:'action'},
}

enums.status ={
    normal:{ name:'正常', value:'normal'},
    disable:{name:'禁用',value:'disable'},
}

enums.system_built_in ={
    built_in:{ name:'内置', value:'built_in'},
    un_built_in:{name:'非内置',value:'un_built_in'},
}
enums.online_status ={
    online:{ name:'在线', value:'online'},
    offline:{name:'离线',value:'offline'},
}

enums.show_status ={
    show:{ name:'显示', value:'show'},
    un_show:{name:'隐藏',value:'un_show'},
}
enums.sex ={
    male:{ name:'男', value:'male'},
    woman:{name:'女',value:'woman'},
    unknown:{name:'未知',value:'unknown'},
}

enums.order_status ={
    1:{ name:'待付款', value:1},
    2:{name:'未发货',value:2},
    3:{name:'待收货',value:3},
    4:{ name:'已支付，但库存不足', value:4},
    5:{name:'交易完成',value:5},
    6:{name:'付款后交易关闭',value:6},
    7:{ name:'付款前交易关闭', value:7},
    8:{name:'ERP进行的订单取消',value:8},
}

enums.share_status = {
    0:{ name:'未审核', value:0},
    1:{name:'审核通过',value:1},
    2:{name:'审核未通过',value:2},
}
enums.share_locked_status = {
    0:{ name:'正常', value:0},
    1:{name:'已锁定',value:1},
}
enums.commission_status = {
    0:{ name:'待结算', value:0},
    1:{name:'已结算',value:1},
    2:{name:'已冻结',value:2},
    3:{name:'已退货',value:3},
}
enums.transfer_status = {
    // 0:{ name:'失败', value:0},
    0:{ name:'提现中', value:0},
    1:{name:'成功',value:1},
}
enums.commission_source = {
    0:{name:'', value:0},
    1:{ name:'一级分销', value:1},
    2:{name:'二级分销',value:2},
    3:{name:'三级分销',value:3},
}
/**
 * 联盟商状态
 */
enums.alliance_status = {
    0:{name:'非联盟商', value:0},
    1:{ name:'已降级', value:1},
    2:{name:'已锁定',value:2},
    3:{name:'正常',value:3},
}

/**
 * 联盟商类型
 */
enums.alliance_type = {
    enterprise:{ name:'企业', value:'enterprise'},
    personal:{name:'个人',value:'personal'},
}
/**
 * 联盟商销售渠道
 */
enums.alliance_sale_channel = {
    offline:{ name:'线下', value:'offline'},
    taobao:{name:'淘宝',value:'taobao'},
    wechat:{name:'微信',value:'wechat'},
}
/**
 * 导师状态
 */
enums.tutor_status = {
    0:{name:'非导师', value:0},
    1:{ name:'已降级', value:1},
    2:{name:'已锁定',value:2},
    3:{name:'正常',value:3},
}



module.exports = enums;
